<div class="modal-header">
    <h4 class="modal-title">{{sale_info.title}}</h4>
</div>
<div class="modal-body clearfix">
    <div class="col-xs-12 row mt20">
        <div class="panel panel-default">
            <div class="panel-heading">
                购票人
                <a class="btn btn-xs btn-success" ng-click="add()">添加</a>
                <a class="btn btn-xs btn-danger" ng-click="removeAll()">清空</a>
                <a class="btn btn-success btn-xs pull-right" style="margin-left: 5px;" href="http://oss.juyouhx.com/CDN/model_vol.xls">下载模板</a>
                <!-- <a class="btn btn-success btn-xs pull-right" style="margin-left: 5px;" ng-click="exportToExcel('#Excel_table_2')">下载模板</a> -->
                <a class="btn btn-success btn-xs pull-right" style="margin-left: 5px;" ng-click="exportToExcel('#Excel_table')">导出人员信息</a>
                <a class="btn btn-info btn-xs pull-right" ng-click="excel()">导入人员信息</a>
                <a id="dlink" download="{{ExcelName}}.xls" ng-show="false"></a>
            </div>
            <div class="panel-body" style="padding: 0px;">
                <table class="table table-bordered" style="margin-bottom: 0px;">
                    <thead>
                        <tr>
                            <th class="text-center" style="width: 80px; padding: 0px; padding-bottom: 7px;">姓名</th>
                            <th class="text-center" style="width: 171px; padding: 0px; padding-bottom: 7px;">身份证</th>
                            <th class="text-center" style="width: 120px;">电话</th>
                            <th class="text-center" style="width: 80px; padding-left: 0px; padding-right: 0px;">是否跟车</th>
                            <th class="text-center" style="width: 100px;">备注</th>
                            <th class="text-center" style="width: 55px; padding: 0px; padding-bottom: 7px;">操作</th>
                            <th class="text-center" style="width: 80px; padding: 0px; padding-bottom: 7px;">校验状态</th>
                            <th class="text-center">结果</th>
                        </tr>
                    </thead>
                    <tbody class="body_data">
                        <tr ng-click="edit($index)" ng-repeat="info in userList" ng-show="userList && userList.length > 0">
                            <td class="text-center">
                                <input type="text" class="form-control" ng-model="info.name" ng-blur="is_pass(info)" placeholder="姓名">
                            </td>
                            <td class="text-center">
                                <input type="text" class="form-control" ng-model="info.cardno" ng-blur="is_pass(info)" placeholder="身份证">
                            </td>
                            <td class="text-center">
                                <input type="text" class="form-control" ng-model="info.mobile" ng-blur="is_pass(info)" placeholder="电话">
                            </td>
                            <td class="text-center">
                                <label class="i-checks m-b-none" style="margin-left: 10px;">
                                    <input type="checkbox" ng-model="info.by_bus_msg">
                                    <i style="margin-left: -35px;"></i>
                                </label>
                            </td>
                            <td class="text-center">
                                <textarea ng-model="info.note"></textarea>
                            </td>
                            <td class="text-center">
                                <a class="btn btn-xs btn-warning mt5" ng-click="remove($index)">删除</a>
                            </td>
                            <td class="text-center">
                                <!-- 校验通过 -->
                                <div ng-if="info.state == 1" style="margin: auto; width: 30px; height: 30px; border-radius: 15px; background-color: green;">
                                </div>
                                <!-- 校验失败 -->
                                <div ng-if="info.state == 2" style="margin: auto; width: 30px; height: 30px; border-radius: 15px; background-color: red;">
                                </div>
                                <!-- 校验中 下单中 -->
                                <div ng-if="info.state == 3" style="margin: auto; width: 30px; height: 30px; border-radius: 15px; background-color: blue;">
                                </div>
                                <!-- 下单完成 -->
                                <div ng-if="info.state == 4" style="margin: auto; width: 30px; height: 30px; border-radius: 15px; background-color: yellow;">
                                </div>
                            </td>
                            <td class="text-center">
                                {{info.desc}}
                            </td>
                        </tr>
                        <tr ng-show="!userList || userList.length == 0">
                            <td colspan="8" class="text-center">
                                没有添加购票人
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

<div class="modal-footer">
    <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="isCreateOrdering">确定</button>
    <button class="btn btn-danger" type="button" ng-click="close()" ng-disabled="isCreateOrdering">关闭</button>
</div>


<table id="Excel_table" class="table table-bordered" style="margin-bottom: 0px;" ng-show="false">
    <thead>
        <tr>
            <th class="col-xs-1 text-center">name</th>
            <th class="text-center" style="width: 171px; padding: 0px; padding-bottom: 7px;">cardno</th>
            <th class="text-center" style="width: 120px;">mobile</th>
            <th class="text-center" style="width: 120px;">num</th>
            <th class="col-xs-2 text-center">note</th>
            <th class="text-center" style="width: 20%;">result</th>
        </tr>
    </thead>
    <tbody class="body_data">
        <tr ng-repeat="info in userList">
            <td class="text-center">
                {{info.name}}
            </td>
            <td class="text-center">
                `{{info.cardno}}
            </td>
            <td class="text-center">
                {{info.mobile}}
            </td>
            <td class="text-center">
                {{info.by_bus == '1'? '跟车': '自驾'}}
            </td>
            <td class="text-center">
                {{info.note}}
            </td>
            <td class="text-center">
                {{info.desc}}
            </td>
        </tr>
    </tbody>
</table>
<style>
    .body_data td {
        padding-left: 3px !important;
        padding-right: 3px !important;
        vertical-align: middle !important;
    }
</style>